<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>钱包盒子-用户注册</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../css/mui.css" />
		<link rel="stylesheet" href="../css/public.css" />
		<link rel="stylesheet" href="../css/login.css" />
	</head>

	<body class="bg-white">
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">手机快速注册</h1>
		</header>
		<div class="mui-content bg-white">
			<form class="login">
				<ul>
					<li class="layout-center">
						<div class="flex-item1">
							<input type="tel" name="phone" id="mobile" placeholder="请输入手机号" oninput="highliht(this);" onkeydown="highliht(this);" onkeyup="highliht(this);" />
						</div>
					</li>
				</ul>
				<div class="btn-box2">
					<a href="javascript:void(0);" id="nextStep" class="btn next-step disabled">下一步</a>
				</div>
			</form>
		</div>
	</body>
	<script src="../js/mui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
	<script>
		mui.init();
		
		//按钮是否可点
		function highliht(dom) {
			if(dom.value.length > 0 ){
				document.getElementById("nextStep").classList.remove("disabled");
				document.getElementById("nextStep").addEventListener('tap', send);
			}else{
				document.getElementById("nextStep").classList.add("disabled");
			}
		}
		
		function send() {
			var user_name = document.getElementById('mobile').value;
			if(!user_name) {
				common.alert("提示", "请输入手机号");
				return false;
			}
			if(!common.isTelphone(user_name)) {
				common.alert("提示", "请输入正确的手机号码");
				return false;
			}
			mui.openWindow({
				url: "reg_two.html",
				id: "reg_two",
				extras: {
					user_name: user_name
				}
			})
		}
	</script>

</html>